package com.emma;


import com.emma.entity.Address;
import com.emma.entity.PageBean;
import com.emma.service.AddressService;
import com.emma.service.impl.AddressServiceImpl;


import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;

import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = "classpath:applicationContext.xml")
public class test {



    @Test
    public void test01(){
        AddressService addressService=new AddressServiceImpl();
        Map<String, Object> map=new HashMap<>();
        map.put("begin",0);
        map.put("size",5);
        map.put("uid",2);
        PageBean<Address> pageBean = addressService.find(map);
        List<Address> data = pageBean.getData();
        for (Address datum : data) {
            System.out.println(datum);
        }
    }
}
